<template>
	<view class="wrap">
			<u-row gutter="16">
				<u-col span="6">
					<view class="demo-layout bg-purple">
						订单数<br>
						{{orders.sum}}
					</view>
				</u-col>
				<u-col span="6">
					<view class="demo-layout bg-purple-light">
						今日营业额
						{{orders.price}}
					</view>
				</u-col>
				
			</u-row>
			<!-- <u-row gutter="16" justify="space-between">
				<u-col span="3">
					<view class="demo-layout bg-purple"></view>
				</u-col>
				<u-col span="9">
					<view class="demo-layout bg-purple-light"></view>
				</u-col>
			</u-row> -->
		</view>
</template>

<script>
	export default {
		data() {
			return {
				orders:[]
			}
		},
		methods: {
			
		},
		created(){
			// console.log(this.$store.state.id)
			const baseUrl="http://localhost:8888"
			uni.request({
				url:baseUrl+'/s/orderform/findorder/'+this.$store.state.id,
				method:"GET"
			}).then(res=>{
				this.orders=res.data.data
				console.log(res.data.data)
			})
		}
	}
</script>

<style scoped>
.wrap {
		padding: 24rpx;
	}

	.u-row {
		margin: 40rpx 0;
	}

	.demo-layout {
		height: 150rpx;
		border-radius: 8rpx;
	}

	.bg-purple {
		background: #d3dce6;
	}

	.bg-purple-light {
		background: #e5e9f2;
	}

	.bg-purple-dark {
		background: #99a9bf;
	}
</style>
